#ifndef DATAKIT_IO_H
#define DATAKIT_IO_H

#include <string>
#include <memory>

namespace AMCAX::Exchange
{
    namespace DataKit
    {
        // Front declaration.
        class IOImpl;

        /*
         * class represents the interfaces to exchange files by using Datakit.
         */
        class IO
        {
        public:
            /*
             * Get the instance for the exchange.
             * @return the singleton instance of this IO exchange.
             */
            static IO &GetInstance();

            /*
             * Initialize the the instance. This must be called before trying to convert files
             * @return
             *   return 0 if initialized the instance succeed.
             */
            int Initialize();

            /*
             * Convert the file from specified source file path to destinate file path.
             * @param[in] srcFilePath
             *   The source file path which wants to convert from. (Note that, we only support step file by now.)
             * @param[in] destFilePath
             *   The destinate file path which wants to convert to.
             * @return
             *   return 0 if Convert succeed.
             */            
            int Convert(const std::string &srcFilePath, const std::string &destFilePath);

            /*
             * Terminate the the instance.
             * @return
             *   return 0 if terminate the instance succeed.
             */            
            int Terminate();

        private:
            /*
             * Default constructor.
             */            
            IO();
            /*
             * Implementation pointer.
             */               
            std::unique_ptr<IOImpl> m_impl;
        };
    }

}

#endif